package com.newbingo.service;

import java.util.List;

import com.newbingo.dao.imple.IGameTableDao;
import com.newbingo.dto.GameTableDto;
import com.newbingo.dto.imple.IGameTableDto;
import com.newbingo.entity.GameTable;
import com.newbingo.service.imple.IGameTableService;
import com.newbingo.util.Pager;

public class GameTableService implements IGameTableService {
	private IGameTableDao gametableDao = null;

	private IGameTableDto dto = null;
	
	/*
	 * 分页查询
	 */
	public Pager findByPage(int start, int limit, int gameno) {
		return dto.findByPage(start, limit, gameno);
	}

	public IGameTableDao getGametableDao() {
		return gametableDao;
	}

	public void setGametableDao(IGameTableDao gametableDao) {
		this.gametableDao = gametableDao;
	}

	public void delete(GameTable gameTable) {
		gametableDao.delete(gameTable);
	}

	public List findAll() {
		return gametableDao.findAll();
	}

	public GameTable findByGameTableId(Integer id) {
		return gametableDao.findByGameTableId(id);
	}
	
	public GameTableDto findById(Integer id){
		return dto.findById(id);
	}

	public List findByName(Object name) {
		return gametableDao.findByName(name);
	}

	public List findByProperty(String propertyName, Object value) {
		return gametableDao.findByProperty(propertyName, value);
	}

	public List findByTableState(Object tableState) {
		return gametableDao.findByTableState(tableState);
	}

	public GameTable merge(GameTable gameTable) {
		return gametableDao.merge(gameTable);

	}

	public void save(GameTable gameTable) {
		gametableDao.save(gameTable);
	}

	public void attachClean(GameTable instance) {
		gametableDao.attachClean(instance);
	}

	public void attachDirty(GameTable instance) {
		gametableDao.attachClean(instance);
	}

	public IGameTableDto getDto() {
		return dto;
	}

	public void setDto(IGameTableDto dto) {
		this.dto = dto;
	}

}
